package ThirdQuestion;

/**
 * @author cyt
 * @date 2020/6/9
 */
public class CallPackage extends Package implements CallService {

    private int callTime;

    private int messageNum;

    public int getCallTime() {
        return callTime;
    }

    public void setCallTime(int callTime) {
        this.callTime = callTime;
    }

    public int getMessageNum() {
        return messageNum;
    }

    public void setMessageNum(int messageNum) {
        this.messageNum = messageNum;
    }

    public CallPackage(int feePerMonth, int callTime, int messageNum){
        super(feePerMonth);
        this.callTime = callTime;
        this.messageNum = messageNum;
    }
    @Override
    public void showAllInfo() {
        System.out.println("本套餐的通话时长为"+getCallTime()+"分钟, 短信数量为"+getMessageNum()+"条, 每月资费为"+super.feePerMonth+"元");

    }

    @Override
    public void callService(int callTime, MobileCard mobileCard) {
        System.out.println(mobileCard.getUsername()+"用户"+"本次通话时间为"+callTime+"分钟");
    }
}
